<?
session_start();
ob_start();
require_once("inc/config.inc.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Client Intranet</title>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-2" />
<link rel="stylesheet" href="css/screen.css" type="text/css" media="screen, projection"/>
<link rel="stylesheet" href="css/print.css" type="text/css" media="print"/>
<!--[if IE]><link rel="stylesheet" href="css/ie.css" type="text/css" media="screen, projection"><![endif]-->
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/jquery.metadata.js" type="text/javascript"></script>
<script src="js/jquery.validate.pack.js" type="text/javascript"></script>
<script src="js/jquery.form.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
	$("a.toggle").click(function() {
		$("div.info").slideToggle("slow");
	});
	$("a.overClient").click(function() {
		$("div#hide").slideUp("fast", function fadeClientForm(){$("div#formClient").fadeIn("slow");});
	});
	$("a.cancel").click(function() {
		$("div#formClient").hide("fast", function showMain(){$("div#hide").fadeIn("slow");});
	});
		$("a.overWebmaster").click(function() {
		$("div#hide").slideUp("fast", function fadeWebmasterForm(){$("div#formWebmaster").fadeIn("slow");});
	});
	$("a.cancel").click(function() {
		$("div#formWebmaster").fadeOut("fast", function showMain(){$("div#hide").fadeIn("slow");});
	});
	
	$("form#webmaster").validate({
		rules: {
			username: "required",
			password: "required",
		},
		submitHandler: function(form) {
			$(form).ajaxSubmit({
				target: 'div#update',
				dataType: 'json',
				success: function(data){
					if(data.avalid){
						window.location='webmasters/';
					}else{
						$("div.error").slideDown("fast");
					}
				}
			});
		}
	});
	$("form#client").validate({
		rules: {
			username: "required",
			password: "required",
		},
		submitHandler: function(form) {
			$(form).ajaxSubmit({
				target: 'div#update',
				dataType: 'json',
				success: function(data){
					if(data.valid){
						window.location='clients/';
					}else{
						$("div.error").slideDown("fast");
					}
				}
			});
		}
	});

}); 
</script>
</head>
<body>
<div class="container">
